public class Student implements Comparable<Student> {
        private String id;
        private String name;
        private int age;
        private int score;
        public Student() {
        }
        public Student(String id, String name,int age, int score) {
            this.id = id;
            this.name = name;
            this.age = age;
            this.score = score;
        }
        public String getId() {
            return id;
        }
        public void setId(String id) {
            this.id = id;
        }
        public String getName() {
            return name;
        }
        public void setName(String name) {
            this.name = name;
        }
        public int getAge() {
            return age;
        }
        public void setAge(int age) {
            this.age = age;
        }
        public int getScore() {
            return score;
        }
        public void setScore(int score) {
            this.score = score;
        }
        @Override
        public int compareTo(Student o) {
            // System.out.println("compareTo");
            int result = this.score - o.score;
            return result;
        }
        @Override
        public String toString() {
                return "Student:" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", score=" + score +";";
        }
}
